package com.huohuzhihui.controller;

import com.huohuzhihui.client.DigitalAssetShardClient;
import com.huohuzhihui.model.ShardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/shard")
@RestController
public class ShardController {


    @Autowired
    DigitalAssetShardClient shardClient;


    /**
     * 添加资产碎片
     * @param shardVo
     * @return
     */
    @GetMapping("/add")
    public String add( ShardVo shardVo){

        return this.shardClient.add( shardVo.getShard_id(), shardVo.getAsset_id(),
                shardVo.getFrom_address(),  shardVo.getTo_address(), shardVo.getTransfer_type(),shardVo.getCreate_time());
    }




}
